/**
 * Created by 小敏哥 on 2018/1/3.
 */
import commonAction from "../../../../../js/actions/commonAction";
import {BACKENDIDS} from "./actionsTypes";

export const backendids = data => ({type: BACKENDIDS, data: data});//违章id列表
//上传图片
export const uploadFile = (data, callBack) => {
    let formData = new FormData();
    formData.append('file', data);
    formData.append('uploadType', '05');
    formData.append('owner', 'year');
    return commonAction.simplePost(formData, 'emsc-partner/c/u/upload.ajax', undefined, callBack);
};

//获取车辆违章所需资料接口
export const getNeedRequirements = (data, callBack) => {
    return commonAction.simplePost(data, 'emsc-partner/b/carViola/getPeccNeedRequirement.ajax', undefined, callBack);
};

//添加车辆违章资料接口
export const addCarRequirement = (data, callBack) => {
    return commonAction.simplePost(data, 'emsc-partner/b/carViola/addCarRequirement.ajax', undefined, callBack);
};

export const getUpdateRequirement = (data, callBack) => {
    return commonAction.simplePost(data, 'emsc-partner/b/carViola/selectCarRequirements.ajax', undefined, callBack);
};
